<?php
// +----------------------------------------------------------------------
// | HisiPHP框架[基于ThinkPHP5.1开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2016-2021 http://www.HisiPHP.com
// +----------------------------------------------------------------------
// | HisiPHP承诺基础框架永久免费开源，您可用于学习和商用，但必须保留软件版权信息。
// +----------------------------------------------------------------------
// | Author: 橘子俊 <364666827@qq.com>，开发者QQ群：50304283
// +----------------------------------------------------------------------

namespace app\common\service;

use app\common\service\Base;

class CheckclothShrinkLog extends Base
{
	/**
	 * 获取日志记录
	 *
	 * @author KING
	 * @date 2020年4月28日
	 *
	 * @param integer $checkclothShrinkId
	 * @param number $type
	 */
	public function getLog($checkclothShrinkId, $type=1) {
		$systemUserKV = getSystemUserKV(true);
		$list = db('checkcloth_shrink_log')->where(["checkcloth_shrink_id" => $checkclothShrinkId, "type" => $type])->order('id desc')->select();
		foreach ($list as &$v) {
			$v['create_time_text'] = date("Y-m-d H:i");
			$v['admin_name'] = arrayGet($systemUserKV, $v['admin_id'], '');
		}
		return $list;
	}
}